import './style/xiugaidenglumima.css';
import React from 'react';
import Navbar from '../component/Navbar';

import { Toast } from 'antd-mobile';
class bindWechat extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            wechatCode: null
        }
    }

    switch() {
        const { wechatCode } = this.state
        if (!wechatCode) {
            Toast.info('请输入微信号', 1.5);
            return
        }

    }
    goBack = () => {
        this.props.history.goBack();
    }
    getCode(e) {
        console.log(e)

        this.setState({ wechatCode: e.target.value })
    }
    render() {
        const { wechatCode } = this.state
        console.log(wechatCode)
        return <div className='xiugaidenglumima'>
            <Navbar onClick={this.goBack} title='绑定微信号' rightText='提交' rightTextClick={() => this.switch()}></Navbar>
            <div className='main'>
                <div className='content'>
                    <div>微信号</div>
                    <input value={wechatCode} onChange={this.getCode.bind(this)} placeholder='请输入微信号'></input>
                </div>
            </div>
        </div >
    }
}

export default bindWechat;